package com.zy.config;

import com.zy.interceptor.WebCustomerInterceptor;
import com.zy.interceptor.WebCustomerInterceptor2;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author CarreyZhou
 * @Date: 2024/5/3 11:35
 */
@Configuration
public class MvcConfiguration implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        WebMvcConfigurer.super.addInterceptors(registry);
        // add your interceptors here
        registry.addInterceptor(new WebCustomerInterceptor()).addPathPatterns("/**");
        registry.addInterceptor(new WebCustomerInterceptor2()).addPathPatterns("/**");
    }

}
